// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the Cloud Bigtable Admin API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
/// let client = BigtableInstanceAdmin::builder().build().await?;
/// // use `client` to make requests to the Cloud Bigtable Admin API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// Service for creating, configuring, and deleting Cloud Bigtable Instances and
/// Clusters. Provides access to the Instance and Cluster schemas only, not the
/// tables' metadata or data stored in those tables.
///
/// # Configuration
///
/// To configure `BigtableInstanceAdmin` use the `with_*` methods in the type returned
/// by [builder()][BigtableInstanceAdmin::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://bigtableadmin.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::bigtable_instance_admin::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::bigtable_instance_admin::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `BigtableInstanceAdmin` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `BigtableInstanceAdmin` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct BigtableInstanceAdmin {
    inner: std::sync::Arc<dyn super::stub::dynamic::BigtableInstanceAdmin>,
}

impl BigtableInstanceAdmin {
    /// Returns a builder for [BigtableInstanceAdmin].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
    /// let client = BigtableInstanceAdmin::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::bigtable_instance_admin::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::bigtable_instance_admin::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::BigtableInstanceAdmin + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::BigtableInstanceAdmin>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BigtableInstanceAdmin> {
        super::transport::BigtableInstanceAdmin::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BigtableInstanceAdmin> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::BigtableInstanceAdmin::new)
    }

    /// Create an instance within a project.
    ///
    /// Note that exactly one of Cluster.serve_nodes and
    /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
    /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
    /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
    /// enabled.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_instance(&self) -> super::builder::bigtable_instance_admin::CreateInstance {
        super::builder::bigtable_instance_admin::CreateInstance::new(self.inner.clone())
    }

    /// Gets information about an instance.
    pub fn get_instance(&self) -> super::builder::bigtable_instance_admin::GetInstance {
        super::builder::bigtable_instance_admin::GetInstance::new(self.inner.clone())
    }

    /// Lists information about instances in a project.
    pub fn list_instances(&self) -> super::builder::bigtable_instance_admin::ListInstances {
        super::builder::bigtable_instance_admin::ListInstances::new(self.inner.clone())
    }

    /// Updates an instance within a project. This method updates only the display
    /// name and type for an Instance. To update other Instance properties, such as
    /// labels, use PartialUpdateInstance.
    pub fn update_instance(&self) -> super::builder::bigtable_instance_admin::UpdateInstance {
        super::builder::bigtable_instance_admin::UpdateInstance::new(self.inner.clone())
    }

    /// Partially updates an instance within a project. This method can modify all
    /// fields of an Instance and is the preferred way to update an Instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn partial_update_instance(
        &self,
    ) -> super::builder::bigtable_instance_admin::PartialUpdateInstance {
        super::builder::bigtable_instance_admin::PartialUpdateInstance::new(self.inner.clone())
    }

    /// Delete an instance from a project.
    pub fn delete_instance(&self) -> super::builder::bigtable_instance_admin::DeleteInstance {
        super::builder::bigtable_instance_admin::DeleteInstance::new(self.inner.clone())
    }

    /// Creates a cluster within an instance.
    ///
    /// Note that exactly one of Cluster.serve_nodes and
    /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
    /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
    /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
    /// enabled.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_cluster(&self) -> super::builder::bigtable_instance_admin::CreateCluster {
        super::builder::bigtable_instance_admin::CreateCluster::new(self.inner.clone())
    }

    /// Gets information about a cluster.
    pub fn get_cluster(&self) -> super::builder::bigtable_instance_admin::GetCluster {
        super::builder::bigtable_instance_admin::GetCluster::new(self.inner.clone())
    }

    /// Lists information about clusters in an instance.
    pub fn list_clusters(&self) -> super::builder::bigtable_instance_admin::ListClusters {
        super::builder::bigtable_instance_admin::ListClusters::new(self.inner.clone())
    }

    /// Updates a cluster within an instance.
    ///
    /// Note that UpdateCluster does not support updating
    /// cluster_config.cluster_autoscaling_config. In order to update it, you
    /// must use PartialUpdateCluster.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_cluster(&self) -> super::builder::bigtable_instance_admin::UpdateCluster {
        super::builder::bigtable_instance_admin::UpdateCluster::new(self.inner.clone())
    }

    /// Partially updates a cluster within a project. This method is the preferred
    /// way to update a Cluster.
    ///
    /// To enable and update autoscaling, set
    /// cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
    /// serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
    /// are ignored. Note that an update cannot simultaneously set serve_nodes to
    /// non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
    /// also specify both in the update_mask.
    ///
    /// To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
    /// and explicitly set a serve_node count via the update_mask.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn partial_update_cluster(
        &self,
    ) -> super::builder::bigtable_instance_admin::PartialUpdateCluster {
        super::builder::bigtable_instance_admin::PartialUpdateCluster::new(self.inner.clone())
    }

    /// Deletes a cluster from an instance.
    pub fn delete_cluster(&self) -> super::builder::bigtable_instance_admin::DeleteCluster {
        super::builder::bigtable_instance_admin::DeleteCluster::new(self.inner.clone())
    }

    /// Creates an app profile within an instance.
    pub fn create_app_profile(&self) -> super::builder::bigtable_instance_admin::CreateAppProfile {
        super::builder::bigtable_instance_admin::CreateAppProfile::new(self.inner.clone())
    }

    /// Gets information about an app profile.
    pub fn get_app_profile(&self) -> super::builder::bigtable_instance_admin::GetAppProfile {
        super::builder::bigtable_instance_admin::GetAppProfile::new(self.inner.clone())
    }

    /// Lists information about app profiles in an instance.
    pub fn list_app_profiles(&self) -> super::builder::bigtable_instance_admin::ListAppProfiles {
        super::builder::bigtable_instance_admin::ListAppProfiles::new(self.inner.clone())
    }

    /// Updates an app profile within an instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_app_profile(&self) -> super::builder::bigtable_instance_admin::UpdateAppProfile {
        super::builder::bigtable_instance_admin::UpdateAppProfile::new(self.inner.clone())
    }

    /// Deletes an app profile from an instance.
    pub fn delete_app_profile(&self) -> super::builder::bigtable_instance_admin::DeleteAppProfile {
        super::builder::bigtable_instance_admin::DeleteAppProfile::new(self.inner.clone())
    }

    /// Gets the access control policy for an instance resource. Returns an empty
    /// policy if an instance exists but does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::bigtable_instance_admin::GetIamPolicy {
        super::builder::bigtable_instance_admin::GetIamPolicy::new(self.inner.clone())
    }

    /// Sets the access control policy on an instance resource. Replaces any
    /// existing policy.
    pub fn set_iam_policy(&self) -> super::builder::bigtable_instance_admin::SetIamPolicy {
        super::builder::bigtable_instance_admin::SetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that the caller has on the specified instance resource.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::bigtable_instance_admin::TestIamPermissions {
        super::builder::bigtable_instance_admin::TestIamPermissions::new(self.inner.clone())
    }

    /// Lists hot tablets in a cluster, within the time range provided. Hot
    /// tablets are ordered based on CPU usage.
    pub fn list_hot_tablets(&self) -> super::builder::bigtable_instance_admin::ListHotTablets {
        super::builder::bigtable_instance_admin::ListHotTablets::new(self.inner.clone())
    }

    /// Creates a logical view within an instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_logical_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::CreateLogicalView {
        super::builder::bigtable_instance_admin::CreateLogicalView::new(self.inner.clone())
    }

    /// Gets information about a logical view.
    pub fn get_logical_view(&self) -> super::builder::bigtable_instance_admin::GetLogicalView {
        super::builder::bigtable_instance_admin::GetLogicalView::new(self.inner.clone())
    }

    /// Lists information about logical views in an instance.
    pub fn list_logical_views(&self) -> super::builder::bigtable_instance_admin::ListLogicalViews {
        super::builder::bigtable_instance_admin::ListLogicalViews::new(self.inner.clone())
    }

    /// Updates a logical view within an instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_logical_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::UpdateLogicalView {
        super::builder::bigtable_instance_admin::UpdateLogicalView::new(self.inner.clone())
    }

    /// Deletes a logical view from an instance.
    pub fn delete_logical_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::DeleteLogicalView {
        super::builder::bigtable_instance_admin::DeleteLogicalView::new(self.inner.clone())
    }

    /// Creates a materialized view within an instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_materialized_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::CreateMaterializedView {
        super::builder::bigtable_instance_admin::CreateMaterializedView::new(self.inner.clone())
    }

    /// Gets information about a materialized view.
    pub fn get_materialized_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::GetMaterializedView {
        super::builder::bigtable_instance_admin::GetMaterializedView::new(self.inner.clone())
    }

    /// Lists information about materialized views in an instance.
    pub fn list_materialized_views(
        &self,
    ) -> super::builder::bigtable_instance_admin::ListMaterializedViews {
        super::builder::bigtable_instance_admin::ListMaterializedViews::new(self.inner.clone())
    }

    /// Updates a materialized view within an instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_materialized_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::UpdateMaterializedView {
        super::builder::bigtable_instance_admin::UpdateMaterializedView::new(self.inner.clone())
    }

    /// Deletes a materialized view from an instance.
    pub fn delete_materialized_view(
        &self,
    ) -> super::builder::bigtable_instance_admin::DeleteMaterializedView {
        super::builder::bigtable_instance_admin::DeleteMaterializedView::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::bigtable_instance_admin::ListOperations {
        super::builder::bigtable_instance_admin::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::bigtable_instance_admin::GetOperation {
        super::builder::bigtable_instance_admin::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::bigtable_instance_admin::DeleteOperation {
        super::builder::bigtable_instance_admin::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::bigtable_instance_admin::CancelOperation {
        super::builder::bigtable_instance_admin::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Bigtable Admin API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
/// let client = BigtableTableAdmin::builder().build().await?;
/// // use `client` to make requests to the Cloud Bigtable Admin API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// Service for creating, configuring, and deleting Cloud Bigtable tables.
///
/// Provides access to the table schemas only, not the data stored within
/// the tables.
///
/// # Configuration
///
/// To configure `BigtableTableAdmin` use the `with_*` methods in the type returned
/// by [builder()][BigtableTableAdmin::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://bigtableadmin.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::bigtable_table_admin::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::bigtable_table_admin::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `BigtableTableAdmin` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `BigtableTableAdmin` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct BigtableTableAdmin {
    inner: std::sync::Arc<dyn super::stub::dynamic::BigtableTableAdmin>,
}

impl BigtableTableAdmin {
    /// Returns a builder for [BigtableTableAdmin].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
    /// let client = BigtableTableAdmin::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::bigtable_table_admin::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::bigtable_table_admin::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::BigtableTableAdmin + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::BigtableTableAdmin>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BigtableTableAdmin> {
        super::transport::BigtableTableAdmin::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BigtableTableAdmin> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::BigtableTableAdmin::new)
    }

    /// Creates a new table in the specified instance.
    /// The table can be created with a full set of initial column families,
    /// specified in the request.
    pub fn create_table(&self) -> super::builder::bigtable_table_admin::CreateTable {
        super::builder::bigtable_table_admin::CreateTable::new(self.inner.clone())
    }

    /// Creates a new table from the specified snapshot. The target table must
    /// not exist. The snapshot and the table must be in the same instance.
    ///
    /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
    /// feature is not currently available to most Cloud Bigtable customers. This
    /// feature might be changed in backward-incompatible ways and is not
    /// recommended for production use. It is not subject to any SLA or deprecation
    /// policy.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_table_from_snapshot(
        &self,
    ) -> super::builder::bigtable_table_admin::CreateTableFromSnapshot {
        super::builder::bigtable_table_admin::CreateTableFromSnapshot::new(self.inner.clone())
    }

    /// Lists all tables served from a specified instance.
    pub fn list_tables(&self) -> super::builder::bigtable_table_admin::ListTables {
        super::builder::bigtable_table_admin::ListTables::new(self.inner.clone())
    }

    /// Gets metadata information about the specified table.
    pub fn get_table(&self) -> super::builder::bigtable_table_admin::GetTable {
        super::builder::bigtable_table_admin::GetTable::new(self.inner.clone())
    }

    /// Updates a specified table.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_table(&self) -> super::builder::bigtable_table_admin::UpdateTable {
        super::builder::bigtable_table_admin::UpdateTable::new(self.inner.clone())
    }

    /// Permanently deletes a specified table and all of its data.
    pub fn delete_table(&self) -> super::builder::bigtable_table_admin::DeleteTable {
        super::builder::bigtable_table_admin::DeleteTable::new(self.inner.clone())
    }

    /// Restores a specified table which was accidentally deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn undelete_table(&self) -> super::builder::bigtable_table_admin::UndeleteTable {
        super::builder::bigtable_table_admin::UndeleteTable::new(self.inner.clone())
    }

    /// Creates a new AuthorizedView in a table.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_authorized_view(
        &self,
    ) -> super::builder::bigtable_table_admin::CreateAuthorizedView {
        super::builder::bigtable_table_admin::CreateAuthorizedView::new(self.inner.clone())
    }

    /// Lists all AuthorizedViews from a specific table.
    pub fn list_authorized_views(
        &self,
    ) -> super::builder::bigtable_table_admin::ListAuthorizedViews {
        super::builder::bigtable_table_admin::ListAuthorizedViews::new(self.inner.clone())
    }

    /// Gets information from a specified AuthorizedView.
    pub fn get_authorized_view(&self) -> super::builder::bigtable_table_admin::GetAuthorizedView {
        super::builder::bigtable_table_admin::GetAuthorizedView::new(self.inner.clone())
    }

    /// Updates an AuthorizedView in a table.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_authorized_view(
        &self,
    ) -> super::builder::bigtable_table_admin::UpdateAuthorizedView {
        super::builder::bigtable_table_admin::UpdateAuthorizedView::new(self.inner.clone())
    }

    /// Permanently deletes a specified AuthorizedView.
    pub fn delete_authorized_view(
        &self,
    ) -> super::builder::bigtable_table_admin::DeleteAuthorizedView {
        super::builder::bigtable_table_admin::DeleteAuthorizedView::new(self.inner.clone())
    }

    /// Performs a series of column family modifications on the specified table.
    /// Either all or none of the modifications will occur before this method
    /// returns, but data requests received prior to that point may see a table
    /// where only some modifications have taken effect.
    pub fn modify_column_families(
        &self,
    ) -> super::builder::bigtable_table_admin::ModifyColumnFamilies {
        super::builder::bigtable_table_admin::ModifyColumnFamilies::new(self.inner.clone())
    }

    /// Permanently drop/delete a row range from a specified table. The request can
    /// specify whether to delete all rows in a table, or only those that match a
    /// particular prefix.
    pub fn drop_row_range(&self) -> super::builder::bigtable_table_admin::DropRowRange {
        super::builder::bigtable_table_admin::DropRowRange::new(self.inner.clone())
    }

    /// Generates a consistency token for a Table, which can be used in
    /// CheckConsistency to check whether mutations to the table that finished
    /// before this call started have been replicated. The tokens will be available
    /// for 90 days.
    pub fn generate_consistency_token(
        &self,
    ) -> super::builder::bigtable_table_admin::GenerateConsistencyToken {
        super::builder::bigtable_table_admin::GenerateConsistencyToken::new(self.inner.clone())
    }

    /// Checks replication consistency based on a consistency token, that is, if
    /// replication has caught up based on the conditions specified in the token
    /// and the check request.
    pub fn check_consistency(&self) -> super::builder::bigtable_table_admin::CheckConsistency {
        super::builder::bigtable_table_admin::CheckConsistency::new(self.inner.clone())
    }

    /// Creates a new snapshot in the specified cluster from the specified
    /// source table. The cluster and the table must be in the same instance.
    ///
    /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
    /// feature is not currently available to most Cloud Bigtable customers. This
    /// feature might be changed in backward-incompatible ways and is not
    /// recommended for production use. It is not subject to any SLA or deprecation
    /// policy.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn snapshot_table(&self) -> super::builder::bigtable_table_admin::SnapshotTable {
        super::builder::bigtable_table_admin::SnapshotTable::new(self.inner.clone())
    }

    /// Gets metadata information about the specified snapshot.
    ///
    /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
    /// feature is not currently available to most Cloud Bigtable customers. This
    /// feature might be changed in backward-incompatible ways and is not
    /// recommended for production use. It is not subject to any SLA or deprecation
    /// policy.
    pub fn get_snapshot(&self) -> super::builder::bigtable_table_admin::GetSnapshot {
        super::builder::bigtable_table_admin::GetSnapshot::new(self.inner.clone())
    }

    /// Lists all snapshots associated with the specified cluster.
    ///
    /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
    /// feature is not currently available to most Cloud Bigtable customers. This
    /// feature might be changed in backward-incompatible ways and is not
    /// recommended for production use. It is not subject to any SLA or deprecation
    /// policy.
    pub fn list_snapshots(&self) -> super::builder::bigtable_table_admin::ListSnapshots {
        super::builder::bigtable_table_admin::ListSnapshots::new(self.inner.clone())
    }

    /// Permanently deletes the specified snapshot.
    ///
    /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
    /// feature is not currently available to most Cloud Bigtable customers. This
    /// feature might be changed in backward-incompatible ways and is not
    /// recommended for production use. It is not subject to any SLA or deprecation
    /// policy.
    pub fn delete_snapshot(&self) -> super::builder::bigtable_table_admin::DeleteSnapshot {
        super::builder::bigtable_table_admin::DeleteSnapshot::new(self.inner.clone())
    }

    /// Starts creating a new Cloud Bigtable Backup.  The returned backup
    /// [long-running operation][google.longrunning.Operation] can be used to
    /// track creation of the backup. The
    /// [metadata][google.longrunning.Operation.metadata] field type is
    /// [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
    /// [response][google.longrunning.Operation.response] field type is
    /// [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
    /// returned operation will stop the creation and delete the backup.
    ///
    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
    /// [google.bigtable.admin.v2.CreateBackupMetadata]: crate::model::CreateBackupMetadata
    /// [google.longrunning.Operation]: longrunning::model::Operation
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_backup(&self) -> super::builder::bigtable_table_admin::CreateBackup {
        super::builder::bigtable_table_admin::CreateBackup::new(self.inner.clone())
    }

    /// Gets metadata on a pending or completed Cloud Bigtable Backup.
    pub fn get_backup(&self) -> super::builder::bigtable_table_admin::GetBackup {
        super::builder::bigtable_table_admin::GetBackup::new(self.inner.clone())
    }

    /// Updates a pending or completed Cloud Bigtable Backup.
    pub fn update_backup(&self) -> super::builder::bigtable_table_admin::UpdateBackup {
        super::builder::bigtable_table_admin::UpdateBackup::new(self.inner.clone())
    }

    /// Deletes a pending or completed Cloud Bigtable backup.
    pub fn delete_backup(&self) -> super::builder::bigtable_table_admin::DeleteBackup {
        super::builder::bigtable_table_admin::DeleteBackup::new(self.inner.clone())
    }

    /// Lists Cloud Bigtable backups. Returns both completed and pending
    /// backups.
    pub fn list_backups(&self) -> super::builder::bigtable_table_admin::ListBackups {
        super::builder::bigtable_table_admin::ListBackups::new(self.inner.clone())
    }

    /// Create a new table by restoring from a completed backup.  The
    /// returned table [long-running operation][google.longrunning.Operation] can
    /// be used to track the progress of the operation, and to cancel it.  The
    /// [metadata][google.longrunning.Operation.metadata] field type is
    /// [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata].  The
    /// [response][google.longrunning.Operation.response] type is
    /// [Table][google.bigtable.admin.v2.Table], if successful.
    ///
    /// [google.bigtable.admin.v2.RestoreTableMetadata]: crate::model::RestoreTableMetadata
    /// [google.bigtable.admin.v2.Table]: crate::model::Table
    /// [google.longrunning.Operation]: longrunning::model::Operation
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn restore_table(&self) -> super::builder::bigtable_table_admin::RestoreTable {
        super::builder::bigtable_table_admin::RestoreTable::new(self.inner.clone())
    }

    /// Copy a Cloud Bigtable backup to a new backup in the destination cluster
    /// located in the destination instance and project.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn copy_backup(&self) -> super::builder::bigtable_table_admin::CopyBackup {
        super::builder::bigtable_table_admin::CopyBackup::new(self.inner.clone())
    }

    /// Gets the access control policy for a Bigtable resource.
    /// Returns an empty policy if the resource exists but does not have a policy
    /// set.
    pub fn get_iam_policy(&self) -> super::builder::bigtable_table_admin::GetIamPolicy {
        super::builder::bigtable_table_admin::GetIamPolicy::new(self.inner.clone())
    }

    /// Sets the access control policy on a Bigtable resource.
    /// Replaces any existing policy.
    pub fn set_iam_policy(&self) -> super::builder::bigtable_table_admin::SetIamPolicy {
        super::builder::bigtable_table_admin::SetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that the caller has on the specified Bigtable
    /// resource.
    pub fn test_iam_permissions(&self) -> super::builder::bigtable_table_admin::TestIamPermissions {
        super::builder::bigtable_table_admin::TestIamPermissions::new(self.inner.clone())
    }

    /// Creates a new schema bundle in the specified table.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_schema_bundle(&self) -> super::builder::bigtable_table_admin::CreateSchemaBundle {
        super::builder::bigtable_table_admin::CreateSchemaBundle::new(self.inner.clone())
    }

    /// Updates a schema bundle in the specified table.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_schema_bundle(&self) -> super::builder::bigtable_table_admin::UpdateSchemaBundle {
        super::builder::bigtable_table_admin::UpdateSchemaBundle::new(self.inner.clone())
    }

    /// Gets metadata information about the specified schema bundle.
    pub fn get_schema_bundle(&self) -> super::builder::bigtable_table_admin::GetSchemaBundle {
        super::builder::bigtable_table_admin::GetSchemaBundle::new(self.inner.clone())
    }

    /// Lists all schema bundles associated with the specified table.
    pub fn list_schema_bundles(&self) -> super::builder::bigtable_table_admin::ListSchemaBundles {
        super::builder::bigtable_table_admin::ListSchemaBundles::new(self.inner.clone())
    }

    /// Deletes a schema bundle in the specified table.
    pub fn delete_schema_bundle(&self) -> super::builder::bigtable_table_admin::DeleteSchemaBundle {
        super::builder::bigtable_table_admin::DeleteSchemaBundle::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::bigtable_table_admin::ListOperations {
        super::builder::bigtable_table_admin::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::bigtable_table_admin::GetOperation {
        super::builder::bigtable_table_admin::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::bigtable_table_admin::DeleteOperation {
        super::builder::bigtable_table_admin::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::bigtable_table_admin::CancelOperation {
        super::builder::bigtable_table_admin::CancelOperation::new(self.inner.clone())
    }
}
